It is entirely possible for a crate to have a build script that is simply
the equivalent to
```rustc
fn main() {
println!("cargo:rustc-link-search=native=/some/path");
}
```
Without actually giving anything to link (for example, because the code
contains `#[link(name="foo")]`. In this case, we aren't actually passing
`-L` through when running doctests, even though they're passed when
compiling the main crate.
Fixes #1592